// Header.h    class Header

#ifndef _KC_HEADER__H_2008_KC_
#define _KC_HEADER__H_2008_KC_

#include <iostream>
#include <string>
#include <stdexcept>
#include <boost/shared_ptr.hpp>
#include <unicode/unistr.h>
#include "../data/MimeDefaults.h"

namespace kc_sf
{
	struct HeaderError : public std::logic_error
	{
		HeaderError(const std::string &msg)
		: std::logic_error(msg)
		{
		}
	};

	/**
	 * Klasa, reprezentująca nagłówek wiadomości.
	 */
	class Header
	{
		public:

			Header() {}
			Header( const std::string &name, const std::string &value );
			virtual ~Header() {}
			virtual Header * clone() const;

			const std::string & getName() const;
			void setName(const std::string &name);

			virtual void setValue(const std::string &value);
			UnicodeString getValue() const;

		protected:

			std::string h_name;
			UnicodeString h_value;
	};

	typedef boost::shared_ptr<Header> HeaderPtr;
	typedef boost::shared_ptr<const Header> HeaderConstPtr;
    
}

#endif // _KC_HEADER__H_2008_KC_

